package com.itgaoshu.hospitalproject.service.impl;

import com.itgaoshu.hospitalproject.bean.*;
import com.itgaoshu.hospitalproject.mapper.ChufangMapper;
import com.itgaoshu.hospitalproject.service.ChufangService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ChufangServiceImpl implements ChufangService {
    @Autowired
    private ChufangMapper chufangMapper;

    @Override
    public List<CPharmacy> selectAllCPh(CPharmacy cPharmacy) {
        return chufangMapper.selectAllCPh(cPharmacy);
    }

    @Override
    public List<ReportVo> selectCf() {
        return chufangMapper.selectCf();
    }

    @Override
    public List<CWarehuose> selware() {
        return chufangMapper.selware();
    }

    @Override
    public List<CCashier> selectAllCC(int perid) {
        return chufangMapper.selectAllCC(perid);
    }

    @Override
    public List<CCashier> selpepi(int perid) {
        return chufangMapper.selpepi(perid);
    }

    @Override
    public Object selectBing(Integer reid) {
        return chufangMapper.selectBing(reid);
    }

    @Override
    public int addbing(CReport cReport) {
        return chufangMapper.addbing(cReport);
    }

    @Override
    public Integer selcadr(CCashier cCashier) {
        return chufangMapper.selcadr(cCashier);
    }

    @Override
    public Integer addchu(CCashier cCashier) {
        return chufangMapper.addchu(cCashier);
    }

    @Override
    public Integer deldrunum(CPharmacy cPharmacy) {
        return chufangMapper.deldrunum(cPharmacy);
    }

    @Override
    public Integer updchu(CCashier cCashier) {
        return chufangMapper.updchu(cCashier);
    }

    //查看该用户有几个已经做过的项目
    @Override
    public Integer selyi(Integer reid) {
        return chufangMapper.selyi(reid);
    };
    //查询该用户有几个已经交过钱的项目
    @Override
    public Integer selgong(Integer reid) {
        return chufangMapper.selgong(reid);
    }

    @Override
    public List<CCashier> selximu(Integer perid) {
        return chufangMapper.selximu(perid);
    }

    //删除处方中的药品
    @Override
    public Integer del(CCashier cCashier) {
        return chufangMapper.del(cCashier);
    }

    //添加仓库中的数量
    @Override
    public Integer adddrunum(CPharmacy cPharmacy) {
        return chufangMapper.adddrunum(cPharmacy);
    }
}
